var storage = {
  set(key, value) {
    localStorage.setItem(key, value);
  },
  get(key) {
    return localStorage.getItem(key);
  },
  remove(key) {
    localStorage.removeItem(key)
  }
}

const getPrinter = () => {
  return storage.get('printer')
}

const updatePrinter = (printer) => {
  storage.set('printer', JSON.stringify(printer))
}

export {
  storage,
  getPrinter,
  updatePrinter
}
